package io.renren.outer.service;

import io.renren.entity.QrCodePaper;
import io.renren.service.QrCodePaperService;
import io.renren.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: hongyuliu
 * @Date: 2019-06-04
 * @Version 1.0
 */
@RestController
@RequestMapping("/outer")
public class QrCodeController {

    @Autowired
    private QrCodePaperService qrCodePaperService;

    @GetMapping("/qrcode")
    public R getQrCode(){
        QrCodePaper qrCodePaper = qrCodePaperService.create();
        qrCodePaper.setQrStr("2020_1_20001_0000");
        qrCodePaper.setUrl("https://dxedu-test.oss-cn-qingdao.aliyuncs.com/i-test/test.png");
        return R.ok("获取成功").put("qrCode",qrCodePaper);
    }
}
